<!-- 
底部页面

 创建者：骆泉
  -->
   <div id="fotter">
	 <div id="box">
               <div class="dbkj">
                    <div class="dbkjz">
                          <a href="#"><img src="<?php echo base_url()?>images/rmxmtj.jpg" width="121" height="32" style="float:left; margin-left:8px;" /></a>
                          <div class="fotterz">
                              <ul>
                                  <li><a href="#">旅游</a><a href="#">设计</a></li>
                                  <li><a href="#">科技</a><a href="#">影视</a></li>
                                  <li><a href="#">摄影</a><a href="#">音乐</a></li>
                                  <li><a href="#">出版</a><a href="#">游戏</a></li>
                                  <li><a href="#">其他</a></li>
                              </ul>
                          </div>
                    </div>
                     <div class="dbkjz">
                     
                          <a href="#"><img src="<?php echo base_url()?>images/ksfb.jpg" width="86" height="26" style="float:left; margin-left:8px; margin-top:4px;" /></a>
                          <div class="fotterz">
                              <ul>
                                  <li><a href="#">发布您的梦想</a></li>
                              </ul>
                          </div>
                    </div>
                     <div class="dbkjz">
                          <a href="#"><img src="<?php echo base_url()?>images/ksdl.jpg" width="86" height="26" style="float:left; margin-left:8px; margin-top:4px;"></a>
                          <div class="fotterz">
                              <ul>
                                  <li><a href="#">新浪微博登录</a></li>
                                  <li><a href="#">腾讯微博登录</a></li>
                                  <li><a href="#">开心网登录</a></li>
                              </ul>
                          </div>
                    </div>
                     <div class="dbkjz">
                          <a href="#"><img src="<?php echo base_url()?>images/gywm.jpg" width="86" height="26" style="float:left; margin-left:8px; margin-top:4px;"></a>
                          <div class="fotterz">
                              <ul>
                                  <li><a href="#">我们的理念</a></li>
                                  <li><a href="#">我们的团队</a></li>
                                  <li><a href="#">加入我们</a></li>
                              </ul>
                          </div>
                    </div>
                     <div class="dbkjz">
                          <a href="#"><img src="<?php echo base_url()?>images/lxwm.jpg" width="92" height="29" style="float:left; margin-left:5px; margin-top:2px;"></a>
                          <div class="fotterz">
                              <ul>
                                  <li><a href="#">新浪微博</a></li>
                                  <li><a href="#">腾讯微博</a></li>
                                  <li><a href="#">网易邮箱</a></li>
                                  <li><a href="#">官方博客</a></li>
                              </ul>
                          </div>
                    </div>
               </div>
               <div class="dbkj">服务热线：13267005112 ,qq群号:192074341, 地址： 深圳南山<a href="#">[来访底图]</a></div>
               <div class="dbkj" style="margin-top:5px;">copyright2012-2015shixian001.com版权所有 粤ICP备12056731号</div>
          </div>
</div>
          <script type="text/javascript" src="<?php echo base_url()?>js/jquery.js"></script>
<!--<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.0.min.js "></script>-->
     <script language="JavaScript">
function bb(id,sort,state){
	if(sort==undefined){
		sort=0;
	}
	if(state==undefined){
		state=0;
	}
	$.ajax({
		  url: '<?php echo site_url('home/get_projects_by_type')?>'+'/'+id+'/'+sort+'/'+state,
		  type: 'GET',
		  dataType: 'html',
		  success: function(data){
			var st='';
			pro_json = eval('('+data+')');
			if(pro_json==''||pro_json==undefined){
				st+='<div class="nrbf">暂无项目，等待您发起此类第一个项目.';
				st+='</div>';
				$('#plist').empty().append(st);
			}else{
				for(var i=0; i<pro_json.length; i++){
					st+='<div class="nrbf">';
					st+='<img src="<?php echo base_url()?>images/1.jpg" width="217" height="155" style="float:left; margin-left:6px; margin-top:5px;" />';
					st+='<div class="nrbfz">';
					st+='<a href="#" class="nrbfzz">'+pro_json[i].title+'</a>';
					st+=' </div>';
					st+=' <div class="nrbfzz">';
					st+='<span>'+pro_json[i].name+'</span>'; 
					st+='<span style="margin-left:35px;">发起于</span>';
					st+='<span style="margin-left:35px;">'+pro_json[i].cityName+'</span>';
					st+='</div>';
	 				st+='<div class="jdtbj">';
				    st+='<div class="jdtbjs" style="width:'+GetPercent(pro_json[i].currentMoney,pro_json[i].collectMoney)+';"></div>';
				   	st+=' </div>';
				    st+='<div class="nrbfzz" style="clear:both; font-size:14px; font-weight:bold; margin-top:10px;">';
				    st+='<a href="#">'+GetPercent(pro_json[i].currentMoney,pro_json[i].collectMoney)+'</a>'; 
				    st+='<a href="#" style="margin-left:35px;">￥'+pro_json[i].currentMoney+'</a>'; 
				    st+='<a href="#" style="margin-left:35px;">'+pro_json[i].submitDay+'天</a>'; 
				    st+='</div>';
					st+='<div class="nrbfzz">';
				    st+='<span>达到</span>'; 
				    st+='<span style="margin-left:45px;">已获支持</span>';
				    st+='<span style="margin-left:40px;">剩余时间</span>'; 
					st+='</div>';
					st+='</div>';
				}
			}
			$('#plist').empty().append(st);
		  },
		  exception:function(e){
			alert(e);
			}
		});
}

///计算两个整数的百分比值 
function GetPercent(num, total) { 
num = parseFloat(num); 
total = parseFloat(total); 
if (isNaN(num) || isNaN(total)) { 
return "-"; 
} 
return total <= 0 ? "0%" : (Math.round(num / total * 10000) / 100.00 + "%"); 
} 

$(document).ready(function() {
	var a='<?php echo $this->uri->segment(3);?>';
	var b='<?php echo $this->uri->segment(4);?>';
	var c='<?php echo $this->uri->segment(5);?>';

	bb(a,b,c);
//	if(a!=''){
//		bb(a,0);//type
//	}else{
//		bb(0,1);
//	}
//	if(c!=''){
//		alert(c);
//		var c='<?php echo $this->uri->segment(5);?>';
//		bb(0,0,c);
//	}
	
	
	$('#plist').click(function() {
	});
});
</script>